package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallNrOrderCancelResponse;

/**
 * TOP API: tmall.nr.order.cancel request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class TmallNrOrderCancelRequest extends BaseTaobaoRequest<TmallNrOrderCancelResponse> {
	
	

	/** 
	* 业务身份标识
	 */
	private String bizIdentity;

	/** 
	* 买家id
	 */
	private Long buyerId;

	/** 
	* 门店code
	 */
	private String storeCode;

	/** 
	* 线下门店交易单号
	 */
	private String storeOrderId;

	/** 
	* 淘系交易订单ID
	 */
	private String tid;

	public void setBizIdentity(String bizIdentity) {
		this.bizIdentity = bizIdentity;
	}

	public String getBizIdentity() {
		return this.bizIdentity;
	}

	public void setBuyerId(Long buyerId) {
		this.buyerId = buyerId;
	}

	public Long getBuyerId() {
		return this.buyerId;
	}

	public void setStoreCode(String storeCode) {
		this.storeCode = storeCode;
	}

	public String getStoreCode() {
		return this.storeCode;
	}

	public void setStoreOrderId(String storeOrderId) {
		this.storeOrderId = storeOrderId;
	}

	public String getStoreOrderId() {
		return this.storeOrderId;
	}

	public void setTid(String tid) {
		this.tid = tid;
	}

	public String getTid() {
		return this.tid;
	}

	public String getApiMethodName() {
		return "tmall.nr.order.cancel";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("biz_identity", this.bizIdentity);
		txtParams.put("buyer_id", this.buyerId);
		txtParams.put("store_code", this.storeCode);
		txtParams.put("store_order_id", this.storeOrderId);
		txtParams.put("tid", this.tid);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallNrOrderCancelResponse> getResponseClass() {
		return TmallNrOrderCancelResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(bizIdentity, "bizIdentity");
		RequestCheckUtils.checkNotEmpty(storeCode, "storeCode");
		RequestCheckUtils.checkNotEmpty(storeOrderId, "storeOrderId");
		RequestCheckUtils.checkNotEmpty(tid, "tid");
	}
	

}